package it.ap.sa.acqua.dao.model;
// Generated 23-ago-2017 17.05.29 by Hibernate Tools 4.3.1.Final

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * TAssTankPlant generated by hbm2java
 */
@DynamicUpdate
@Cache(region = "it.eng.db.TAssTankPlant", usage = CacheConcurrencyStrategy.READ_WRITE)
@Entity
@Table(name = "t_ass_tank_plant", schema = "public")
public class TAssTankPlant implements java.io.Serializable {

	private Long id;

	private Long idTank;

	private Long idPlant;

	public TAssTankPlant() {
	}

	public TAssTankPlant(Long idTank, Long idPlant) {
		this.idTank = idTank;
		this.idPlant = idPlant;
	}

	@GenericGenerator(name = "generator", strategy = "org.hibernate.id.SequenceGenerator", parameters = @Parameter(name = "sequence", value = "sequence_id"))
	@Id
	@GeneratedValue(generator = "generator")

	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "id_tank")
	public Long getIdTank() {
		return this.idTank;
	}

	public void setIdTank(Long idTank) {
		this.idTank = idTank;
	}

	@Column(name = "id_plant")
	public Long getIdPlant() {
		return this.idPlant;
	}

	public void setIdPlant(Long idPlant) {
		this.idPlant = idPlant;
	}

	/**
	 * toString
	 * @return String
	 */
	public String toString() {
		StringBuffer buffer = new StringBuffer();

		buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
		buffer.append("id").append("='").append(getId()).append("' ");
		buffer.append("idTank").append("='").append(getIdTank()).append("' ");
		buffer.append("idPlant").append("='").append(getIdPlant()).append("' ");
		buffer.append("]");

		return buffer.toString();
	}

}
